<?php 
ob_start();
session_start(); 
include('header.php');
//include('config.php');
if(isset($_SESSION['user'])) {
	if($_SESSION['rang'] > 0) {
		$topmenu = '&#124; <a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'changepass\', \'Wachtwoord wijzigen\', \'pages/login/changepass.php\', true, \'\');">Wachtwoord wijzigen</a> &#124; ';
	}
	if($_SESSION['rang'] == 5) {
		$topmenu .= '&#124; ll &#124; ';
	}
	if($_SESSION['rang'] == 16) {
		$topmenu .= '&#124; <a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'klas\', \'Mijn klas\', \'pages/titularis/overzicht.php\', true, \'\');">Mijn klas</a> &#124; ';
	}
}
?>

<html>
<head>
	<title>Untitled</title>
<script src="j/post.js" type="text/javascript"></script>
</head>

<body>

<div><?php
echo "&nbsp;";
echo "<div>";
echo "<div><center>";
 echo "<table border=0 width=\"100px\" > ";
echo  "<tbody>";
echo    "<tr>";
echo '<td STYLE=\"width: 50%; text-align : center;\"><center><acronym title="Leerlingenbeheer"><a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'tab_lln\', \'Leerlingen\', \'pages/leerlingen/menu.php\', true, \'\');"><img src="i/system-users.png" /><br /> Leerlingen</a></center></td>';
echo '<td><center><a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'tab_bekijkklas\', \'Klassen\', \'pages/klassen/menu.php\', true, \'\');"><img src="i/lists.png" /><br />Klassen</a></acronym></center></td>';
echo '<td><center><a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'tab_vakken\', \'Vakken\', \'pages/vakken/menu.php\', true, \'\');"><img src="i/vakken.png" /><br />Vakken</a></acronym></center></td>';
echo "</tr>";

echo " </tbody>";

echo "</table>";
echo "<div class=\".clearfix\" ></div>";
echo "</center></div>";
echo "</div>";?>
<?php echo $topmenu; ?>
	<!--<a href="javascript:void(0)" onclick="AjaxTabs.OpenTab('tab_page2', 'Page 2', 'page2.html', true, '');">Load Page 2</a><br><br>-->
Welkom op het administratiesysteem van <?php echo $school;?>. <br>Gelieve hieronder in te loggen met je mailadres en je wachtwoord. Als je je wachtwoord vergeten bent klik je op "<tt>Wachtwoord Vergeten?</tt>".<hr>
<div id="login">
<?php
if (empty($_SESSION['user'])) {
    ?>
<form id="myForm" method="POST">
<table>
  <tbody>
    <tr>
      <td>Mailadres:</td>
      <td><input type="text" id="naam"> </td>
    </tr>
    <tr>
      <td>Wachtwoord:</td>
      <td><input type="password" id="password" ><tt><a href="javascript:void(0)" onclick="AjaxTabs.SetURL('pages/login/wwvergeten.php');">Wachtwoord vergeten?</a></tt></td>
    </tr>
    <tr>
      <td></td>
      <td><input type="button" name="knop" value="Inloggen" onclick="javascript:formulier1();"></td>
    </tr>
	<!--<tr><TD><a href="javascript:void(0)" onclick="Pieter.SetURL(float: right;'pages/login/wwvergeten.php');">Wachtwoord vergeten?</a></TD></tr>-->
  </tbody>
</table>
</form>

<div id="divOutput"></div>
<div id="divWait" style="display:none;"><img src="i/indicator.gif">Bezig met inloggen...</div>
<?php
} else {

	echo 'Je bent ingelogd als <b>'.$_SESSION['user']."</b><br>Je rang is ".$_SESSION['rang'];
	echo '(<a href="javascript:void(0)" onclick="AjaxTabs.SetURL(\'modules/login/uitloggen.php\');">Uitloggen</a>)<br>';
		if ($_SESSION['rang'] > 20)
		{

?>
<div style="float: right;">
<form method="get" action="" class="asholder">
	<small style="float:right"><input type="text" id="testid" value="" style="font-size: 10px; width: 20px; display:none;" disabled="disabled" /></small>
	<label for="testinput">Zoek een leerling:</label>
	<input style="width: 200px" onkeypress="javascript:Zoek.lln();" type="text" id="testinput" value="" autocomplete="off" /> 
	<!--<input type="submit" value="Bekijk leerling" name="bekijkleerling" />-->
</form>
<div class=".clearfix" ></div>
</div>
<?php


			//echo '<a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'tab_lln\', \'Leerlingen\', \'pages/leerlingen/nieuw.php\', true, \'\');"><img src="i/kuzer.png" /></a><br>';
			//echo '<a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'tab_addlln\', \'Voeg een nieuwe toe\', \'pages/leerlingen/nieuw.php\', true, \'\');">Add lln</a><br>';
			//echo '<a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'tab_bekijkklas\', \'Klasoverzicht\', \'pages/klassen/lijst.php\', true, \'\');">Bekijk klas</a><br />';
			echo '<a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'tab_nieuweklas\', \'Klas toevoeken\', \'pages/klassen/nieuw.php\', true, \'\');">maak klas</a><br />';
			echo '<a href="javascript:void(0)" onclick="AjaxTabs.OpenTab(\'tab_bekijkklas\', \'Vak toevoegen\', \'pages/vakken/nieuw.php\', true, \'\');">Vak toevoegen</a><br />';
		}
}
?>

<div id="results" />


</div>
</div>


</body>
</html>
<?php
     include('footer.php');
     
ob_end_flush();
?>
